﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="FormDocuments.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <!--#include virtual="include/Head.ascx"-->

    <script type="text/javascript" language="javascript">				
		    function doDelete(strID, strType)
		    {
			    if (confirm('Bạn có thực sự muốn xóa'))
			    {
	                var vnpage= getUrlVars()['page_number'];
	                if(vnpage)
	                    window.location.href = "FormDocuments.aspx?type="+strType+"&action=delete&PortsID=" + strID + "&page_number=" + vnpage;
	                else
		                window.location.href = "FormDocuments.aspx?type="+strType+"&action=delete&PortsID=" + strID;
		        }
		    }
		   
            function getUrlVars()
            {
                var vars = [], hash;
                var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
                for(var i = 0; i < hashes.length; i++)
                {
                    hash = hashes[i].split('=');
                    vars.push(hash[0]);
                    vars[hash[0]] = hash[1];
                }
                return vars;
            }
    </script>

</head>
<body>
    <div id="body-wrapper">
        <div id="header">
            <!--#include virtual="include/top.ascx"-->
        </div>
        <div id="main-content1">
            <h2>
                FORM <%Response.Write(strProcessName); %></h2>
            <div class="clear">
            </div>
            <div class="content-box">
                <form id="frmCarrContact" runat="server" autocomplete="off">
                <%if (nPermissions >= 3) {%>
                    <div class="content-box-header">
                        <h3 style="cursor: s-resize;">
                         Form <%Response.Write(strProcessName); %> Add [Edit] </h3>
                        <div class="clear">
                        </div>
                    </div>
                    <table class="adminedit" style="width: 100%;">
                    <tr> <td colspan="2"></td> </tr>
                        <tr>                          
                            <th align="left" width="150px">
                                Name</th>     
                                 <td>
                                <asp:TextBox class="cls" ID="txtName" runat="server" Width="200" TabIndex="2"></asp:TextBox>
                            </td>                          
                        </tr>    
                        <tr>                          
                            <th align="left" width="150px">
                                Description</th>     
                                 <td>
                                <asp:TextBox class="cls" ID="txtDescription" runat="server" Width="400" TabIndex="2"></asp:TextBox>
                            </td>                          
                        </tr>    
                         <%if (nPermissions >= 7) {%>                   
                        <tr>
                            <th align="left" width="150px">
                            File Upload
                            </th>
                            <td >
                            <INPUT id="FileInput"  type="file" width="400" name="File1" runat="server">                                
                            </td>
                        </tr>
                        <%} %>
                        <tr>
                        <td colspan="2">
                            <asp:Label ID="lblInfo" runat="server" CssClass="error"></asp:Label>
                        </td>
                        </tr>
                    </table>
                    <table class="paramlist admintable" width="100%">
                        <tr>
                            <td colspan="2">
                                <asp:Button class="button" ID="btnSave" runat="server" TabIndex="2" Text="Save"
                                    OnClick="btnSave_Click" /></td>
                        </tr>
                    </table>
                    <%} %>
                    <div class="content-box-header">
                        <h3 style="cursor: s-resize;">
                            FORM <%Response.Write(strProcessName); %> LIST</h3>
                        <div class="clear">
                        </div>
                    </div>
                    <fieldset>
                        <asp:Repeater ID="rptData" runat="server">
                            <ItemTemplate>
                                <tr onmouseover="this.style.background='#dbf0c9'" onmouseout="this.style.background='#ffffff'">                              
                                    <td align="center">
                                        <%# DataBinder.Eval(Container.DataItem, "Index")%>
                                    </td>
                                    <td>
                                        <%# DataBinder.Eval(Container.DataItem, "Name") %>
                                    </td>     
                                     <td>
                                        <%# DataBinder.Eval(Container.DataItem, "Description") %>
                                    </td>  
                                     <td  align="center">
                                        <%# DataBinder.Eval(Container.DataItem, "Location") %>
                                    </td>                                   
                                    <td align="center">
                                        <%# DataBinder.Eval(Container.DataItem, "LastUpdate") %>
                                    </td>
                                    <%if (nPermissions >= 3) {%>                                              
                                    <td align="center">
                                        <%# DataBinder.Eval(Container.DataItem, "Action") %>
                                    </td>
                                    <%} %>
                                </tr>
                            </ItemTemplate>
                            <HeaderTemplate>
                                <table cellspacing="0" cellpadding="0" width="100%" border="0" class="adminlist">
                                    <thead>
                                        <tr style="background: #CCC;">
                                            <!--th align="center" width="50px">
                                                STT</th -->
                                                 <th align="center" width="50px">
                                                Index</th>
                                            <th align="center" width="300px;">
                                                Name </th>      
                                                 <th align="left">
                                                Description </th>      
                                                 <th align="center" width="100px;">
                                                Download </th>                                           
                                                <th align="center" width="75px;">
                                                Update</th>
                                               <%if (nPermissions >= 3) {%>                                                  
                                                <th align="center" width="100px">
                                                Action</th>
                                                <%} %>
                                        </tr>
                                    </thead>
                            </HeaderTemplate>
                            <FooterTemplate>
                                </TABLE>
                            </FooterTemplate>
                        </asp:Repeater>
                    </fieldset>
                    <div class="clear">
                    </div>
                    <div id="footer">
                        <%=strPager%>
                    </div>
                </form>
            </div>
        </div>
    </div>

    <%--<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
    </script>

    <script type="text/javascript">
_uacct = "UA-2623402-1";
urchinTracker();
    </script>--%>

</body>
</html>
